home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / util2 / prexcm11.zip / PROTEXCM.DOC < prev    next >
Text File  |  1993-04-26  |  20KB  |  404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                        Protect! EXE/COM version 1.1
  8.                 (C) 1993 Jeremy Lilley, All Rights Reserved
  9.                               April 26, 1993
  10.  
  11.  
  12.  
  13. NOTE: PLEASE READ THIS DOCUMENTATION WELL BEFORE ATTEMPTING TO USE THIS
  14. PROGRAM -- YOU MAY ACCIDENTALLY BUT IRREVERSIBLY DAMAGE FILES!!!
  15.  
  16.  
  17.  
  18. Contents:
  19.         Introduction
  20.         Requirements
  21.         How to use Protect! EXE/COM
  22.         Which Files can't be Protected
  23.         Legal Terms / Disclaimer
  24.         License
  25.         How Does Protect! EXE/COM Stand up to Other Utilities
  26.         Notes About COM Protecting
  27.         Notes about EXE protecting
  28.         Finally, Protect! EXE/COM's Cost
  29.  
  30.  
  31.  
  32.  
  33.  
  34. Introduction:
  35.  
  36.  
  37.  
  38.      Finally, you can truly protect your EXE and COM files from
  39. modification and still leave them executable! If you are a programmer, this
  40. program can be one of your most important tools -- you can save time and
  41. energy by simply using this program to scramble your EXE or COM programs
  42. instead of working on complicated copy-protection schemes of your own.
  43. Shareware authors in particular can provide a peace of mind to their
  44. potential registrants by protecting their programs from possible hacking
  45. that may occur before the potential customers obtain the product. Others
  46. can use this program for additional security in a virus-prone environment
  47. or to protect their software investment. Protect! EXE/COM is extremely
  48. effective in the level of security that it provides -- a CRC (Cyclic
  49. Redundancy Check, complex check for file integrity) is calculated whenever
  50. the protected program is loaded, and no program with a bad CRC will be
  51. allowed to run at all. Compare that to the fact that NO OTHER PROGRAM ON
  52. THE MARKET SUPPORTS CRC CALCULATIONS EVERY TIME a protected program is
  53. loaded -- not even PKLite (R) commercial (which still happens to cost
  54. almost $150). You will find that Protect! EXE/COM is the best product for
  55. the security of your EXE and COM files as well as the best value for your
  56. file security dollar.
  57.  
  58.  
  59.  
  60.  
  61.      Let's go down memory lane briefly and explore some of the more
  62. primitive methods used to secure EXE and COM files. In the beginning of
  63. computing, programmers simply hoped that nobody was smart enough to modify
  64. their files. This method worked until the advent of malicious, clever
  65. hackers with sophisticated hex editors. Programmers then started resorting
  66. to some security methods like copy protection and "tying" a file to the
  67. disk; however, they were extremely obtrusive and slow -- they did not work.
  68. LZEXE and then PKLite came out and programmers thought that by simply
  69. compressing the files with utilities like these, they were home-free. When
  70. UnLZEXE came out and along with PKLite and its decompress option,
  71. programmers were again starting to have problems with protecting their EXE
  72. and COM files. To trick these decompressors, programmers would simply use
  73. their favorite hex editors to change the signature that UnLZEXE or PKLite
  74. would look for on a file and hoped that nobody would change the signature
  75. back to the original and decompress the file. PKWare added a -E option on
  76. the $150 commercial version of PKLite to prevent decompression, but that
  77. has not really worked because hackers have created programs to expand the
  78. "unexpandable" PKLite -E files and made them widely available -- one BBS
  79. local to me has a couple of such programs. Now what for programmers who
  80. wish to preserve the integrity of their programs ? I created Protect!
  81. EXE/COM to solve this problem. 
  82.  
  83.  
  84.  
  85.  
  86. Requirements:
  87.  
  88.  
  89.  
  90.      The requirements are basically nil: DOS 2.0, IBM PC, 256k, etc... I
  91. can run this program on my 4.77 mhz XT and have it run quickly. The one
  92. major software requirement for protecting EXE files is that you are
  93. REQUIRED TO OWN AN EXECUTABLE COMPRESSION PROGRAM such as LZEXE (FREE!),
  94. PKLite, or Compack. The reasons are simple -- scrambled data seems more
  95. scrambled if it is compressed first. If you have huge sequences of the same
  96. character (particularly ASCII #0), the encoding sequence can be revealed
  97. much more easily than if you simply have the tokens and marker characters
  98. that a compression program would leave instead. Relocatable items are also
  99. resolved by the compression program, allowing Protect! EXE/COM to calculate
  100. a CRC reliably. Of course, the file also takes up less space when
  101. compressed with an executable compressor, and it will give a hacker more
  102. problems than those that Protect! EXE/COM gives alone. Protect! EXE/COM
  103. also can insure that the programs that it protects will run consistently if
  104. they originate in the more consistent form that LZEXE or PKLite provides
  105. them in. Besides, LZEXE is a free program thanks to the generosity of
  106. Fabrice Bellard, and if you need a good yet free EXE compression utility,
  107. you should obtain that program (because it only takes a few minutes to get
  108. by modem or a few dollars for it on a disk, and it has been translated into
  109. English, you really should have no excuse for not having it). Most
  110. importantly, Protect! EXE/COM will almost surely protect any file that has
  111. been compressed with LZEXE or PKLite because the requirements are very
  112. similar: overlays, Windows files, and OS/2 files that cannot be compressed
  113. with LZEXE and PKLite cannot be protected by Protect! EXE/COM either, so if
  114. a file can be compressed, it can probably be protected.
  115.  
  116.  
  117.  
  118.  
  119.  
  120. How to use Protect! EXE/COM:
  121.  
  122.  
  123.  
  124.      To use Protect! EXE/COM, simply run ProtExCm.EXE with the program to
  125. protect and the password as parameters. The password can contain no spaces,
  126. so use underscores instead if desired. Here is an example:
  127.  
  128.      ProtExCm PROGRAM.EXE This_is_My_Password
  129.  
  130. PROGRAM.EXE is protected with "This_is_My_Password" as the password. The
  131. original PROGRAM.EXE is renamed to PROGRAM.OLD. The symbol @ can be used to
  132. say that the password is in a file:
  133.  
  134.      ProtExCm MYPROG.COM @MYPASSWD.FIL
  135.  
  136. MYPROG.COM is encrypted with the contents of MYPASSWD.FIL as the password.
  137. Only the first 255 bytes of the file will be used for the password, and if
  138. the file is less than 255 bytes, only that will be used as the password.
  139. Please note that the same password will probably not yield the same
  140. encoding sequence because of the way that the password is generated (the
  141. time of day and the date is used along with the password to insure greater
  142. randomness). Once again, the original MYPROG.COM is renamed MYPROG.OLD.
  143.      Please note that no file can be expanded after being protected with
  144. Protect! EXE/COM, so please preserve the original file until you are sure
  145. that the protected file runs correctly (some incompatibilities may arise
  146. with certain files). That is about all that you need to know before you can
  147. really start protecting your programs with Protect! EXE/COM. EXE files must
  148. be compressed with LZEXE, PKLite, or Compack and then protected but COM
  149. files can be directly protected. A file called Protect.BAT is included, and
  150. using it can be much easier than doing the steps separately:
  151.  
  152.      Protect.BAT :
  153.           if %2=="COM" goto comfile
  154.           lzexe %1.EXE                     (you can use PKLite here also)
  155.           ren %1.OLD %1.BAK
  156.           ProtExCm %1.EXE This_isn't_my_Password
  157.           del %1.old
  158.           ren %1.bak %1.old
  159.           goto End
  160.           :comfile
  161.           REM you can use PKLite to compress COM files if you want
  162.           ProtExCm %1.Com This_isn't_my_Password
  163.           :End
  164.           
  165.      To call this batch file, simply type "Protect PROGRAM COM" to protect
  166. PROGRAM.COM or "Protect PROGRAM EXE" to protect PROGRAM.EXE. 
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176. Which Files can't be Protected:
  177.  
  178.  
  179.  
  180.      MS Windows, OS/2, and overlay files cannot be protected with Protect!
  181. EXE/COM. Basically, anything that can be compressed with LZEXE or PKLite
  182. can be protected. Some programs, however, do not like being protected. Some
  183. commercial programs have it in their licenses that they cannot be
  184. protected, and other programs simply have types of copy-protection which
  185. inhibit their protection with this program. DO NOT PROTECT COMMAND.COM,
  186. IBMBIO.COM, IBMDOS.COM (IBMBIO.COM and IBMDOS.COM correspond to IO.SYS and
  187. MSDOS.SYS in MS-DOS), or any other system-type file. You will most likely
  188. have to reboot the computer from a system disk if you try that. Other
  189. programs also have their own loaders like COMMAND.COM does -- don't protect
  190. these either.
  191.  
  192.  
  193.  
  194.  
  195. Legal Terms / Disclaimer:
  196.  
  197.  
  198.      Protect! EXE/COM ("program") will alter executable files and may
  199. render them useless (that is why .OLD files are created, in case of
  200. incompatibility arises with a particular file) in certain circumstances.
  201. Under no circumstances may Jeremy Lilley ("author") be held liable or
  202. accountable for any damage to system files, executable files, data files,
  203. or any other system damage. The author also may not be held accountable for
  204. loss of profits or for any other damages incurred by the use or misuse of
  205. the program. The author has forewarned any users that permanent damage to
  206. files may occur with misuse of his program and in executing the program,
  207. any user understands this risk. This also seems the place to say that
  208. PKLite is a registered trademark of PKWare Corp., MS Windows is a
  209. registered trademark of Microsoft Corp., and OS/2 is a registered trademark
  210. of IBM corp.
  211.      Don't worry -- there is little risk of damage resulting from this
  212. program's use as long as you use it correctly. However, if you try to make
  213. it mess up, it probably will. Just don't try protecting IBMBIOS.COM and
  214. then wondering why your system won't boot up correctly.
  215.  
  216.  
  217.  
  218.  
  219.  
  220. License:
  221.  
  222.  
  223.  
  224.      You may use Protect! EXE/COM for the purposes of evaluating it (after
  225. understanding the disclaimer and the documentation) for 30 days. No files
  226. protected by Protect! EXE/COM during this trial period may be distributed
  227. to other computers at all, commercially or non-commercially. If you find
  228. Protect! EXE/COM to be of use to you, you must register Protect! EXE/COM
  229.  
  230.  
  231.  
  232.  
  233. with the author. Government, educational, and commercial institutions
  234. absolutely must register this program with the author (please contact him
  235. for quantity discounts). Sysops, user groups, disk vendors, and other
  236. similar organizations may distribute Protect! EXE/COM provided that no
  237. files are excluded from the distribution and that no more that $8 is
  238. charged for distribution.
  239.  
  240.  
  241.  
  242.  
  243. How Does Protect! EXE/COM Stand up to Other Utilities?
  244.  
  245.  
  246.  
  247.      Protect! EXE/COM's first concern is security -- especially with EXE
  248. files. While NO OTHER utility allows a CRC to be taken EACH time your
  249. program is run, Protect! EXE/COM does so each and every time. Though
  250. loading may be slowed a half of a second on average, Protect! EXE/COM is
  251. still much faster than fooling around with copy protection-type schemes
  252. because Protect! EXE/COM's loader loads completely in memory using highly-
  253. optimized routines. Try PKLiting an EXE file and change a byte or two in
  254. the middle of the file (find parts of text that you can still recognize
  255. slightly). As long as the program doesn't crash, PKLite doesn't notice your
  256. changes at all. A hacker can also decompress a program compressed with
  257. PKLite or LZEXE quite easily -- even if a program is compressed with the   
  258. -E option (supposedly "invincible") on the commercial version of PKLite.
  259. After decompressing, any hacker can "fix" your program (remove copyright
  260. screens, add "trojan horse" routines, etc...), compress it up again, and
  261. spread it around, possibly damaging your profits, your reputation, and
  262. others' computers. (I hope you have a good disclaimer...) Fortunately,
  263. hacking is not totally rampant like that, but it still is a possibility and
  264. a risk, and it is much better to pay a few dollars to be safe than to be
  265. sorry. I don't want to have "hacks" of my programs floating around or to
  266. have to worry about that, and neither should you. Though no software-only
  267. protection program like this is 100% fool-proof, I am pretty sure this
  268. program is the best for protecting your EXE and COM files. Most "trojan
  269. horses" and "hacks" can't be detected by ordinary virus scanners, and it is
  270. up to you to defend the security and well-being of your programs.
  271.  
  272.  
  273.  
  274.  
  275.  
  276. Notes About COM Protecting:
  277.  
  278.  
  279.  
  280.      One of the main disadvantages with this program is its decrease in
  281. loading speed. However, since a COM file is always less than 64k (65536
  282. bytes), any decrease in loading speed is not much of a factor. The COM file
  283. protector is much less sophisticated than the EXE file protector. The COM
  284. protector calculates a simple CRC and does a little encrypting, but not to
  285. the extent that the EXE protector does. You can use Protect! EXE/COM on any
  286.  
  287.  
  288.  
  289.  
  290. COM file that you want to add a moderate level of protection to. The COM
  291. protector will discourage most people from touching the file and give
  292. anyone who wants to get through it a great deal of grief. The COM protector
  293. adds fewer than 200 bytes to a file yet adds a great deal of protection. It
  294. is not the most sophisticated protector possible, but it calculates a CRC
  295. and works quickly. There is little slowing in loading, but to calculate it
  296. exactly, I created the largest possible COM file (just less than 64k) and
  297. loaded it on my 4.77 mhz XT (its first instruction was to terminate and the
  298. other 63k or so was garbage). Unprotected, it took 1.9 seconds, and
  299. protected, it took 2.5 seconds. The difference in the speed is negligible
  300. on an XT, and it is even more negligible on a 386 or 486. Besides, if you
  301. care enough about that 0.6 of a second on a 4.77mhz XT, you will probably
  302. have a 486 fast enough that you will not be able to blink faster than the
  303. program's loading. Please note that neither the COM protector nor the EXE
  304. protector can really guard too much against viruses; if the virus is tacked
  305. on a file after it is protected and it does not modify the program's actual
  306. image, there will be no warning. If you want to test Protect! EXE/COM's
  307. protection against hacking, simply protect a file, use your favorite hex
  308. editor (you probably won't recognize anything in the file with it) to
  309. change any byte (or more), and then run the file. If the change is in the
  310. loader, the program will simply crash; however, if the change is in the
  311. program's image, the program will terminate and you will get a CRC error
  312. message. Remember that error message, because whenever a change is
  313. detected, the program will halt with that message. If you are a programmer,
  314. you should make a note in your documentation to contact you if your user
  315. encounters that message along with where the user obtained the file.
  316.  
  317.  
  318.  
  319.  
  320. Notes about EXE protecting:
  321.  
  322.  
  323.  
  324.      This EXE file loader will give any hacker a great deal of trouble
  325. trying to defeat: all data areas are encrypted, a more reliable CRC method
  326. is used, self-modifying code (what every hacker just loves to see) is
  327. sprinkled liberally in the file, all data areas and decryption units are
  328. cleared after being used, and a rather long encrypting sequence is used.
  329. Please read the COM file notes above before reading this, and also try
  330. testing Protect! EXE/COM's protecting ability by modifying protected files.
  331. Since EXE files can have a rather unlimited size limit (for MS-DOS running
  332. under 640k conventional memory in real mode WITHOUT OVERLAYS, there is
  333. somewhat of a practical size limit about 400-500k), they can tend to take
  334. up many 64k segments, requiring them to be loaded using slower methods. It
  335. is for chiefly this reason why loading EXE files with Protect! EXE/COM may
  336. be a bit slower than loading COM files of the same size. Both decrypting
  337. and CRC calculating are done in one pass with a minimum of PUSHing and
  338. POPing to speed things up, and little noticeable slowing may occur. You
  339. must use a compressor such as LZEXE or PKLite before protecting an EXE file
  340. in order to insure that the relocation pointers are dealt with. PKLite
  341. still leaves one relocation pointer in the table, so a special temporary
  342. file must be created which makes the actual protecting of a PKLited file
  343.  
  344.  
  345.  
  346.  
  347.  
  348. much slower. The EXE protector adds around 300 bytes to a file, depending
  349. on the actual file size, and about 50 bytes in addition to that if the file
  350. was PKLited instead of LZEXEd. That much space is negligible, especially
  351. with the advent of multi-gigabyte harddrives. In addition to any overhead
  352. that LZEXE or PKLite adds to a file, Protect! EXE/COM will increase the
  353. initial load time by approximately 50%. Remember, THAT DOES NOT NECESSARILY
  354. MAKE IT TAKE 50% LONGER FOR THE PROGRAM TO START because a good portion of
  355. the delay for a program's loading is the program's own initialization of
  356. variables instead of just MS-DOS's physical loading, and that period of
  357. time will stay constant. In and all, you really should ONLY EXPECT A 20-
  358. 30% DELAY IN TOTAL PROGRAM STARTING TIME, and that extra half-second or so
  359. of delay will not really bother anybody. You are only allowed to run
  360. Protect! EXE/COM on an EXE file once because the time delay for a file that
  361. has had Protect! EXE/COM run on it several times can start to get way too
  362. long. Again, anybody who will kill himself over a 20% increase in load time
  363. (which will usually be about a half a second at the beginning of a program)
  364. will have the most powerful 486 on the market on his desk. But in any case,
  365. that 20% or so increase of load time will not be noticed AT ALL by most
  366. users on most files.
  367.  
  368.  
  369.  
  370. Finally, Protect! EXE/COM's Cost:
  371.  
  372.  
  373.      After seeing how Protect! EXE/COM can save you time, effort, energy,
  374. and money, it is now time to discuss price. There are NO "run-time fees,"
  375. "royalties," or anything of the type attached to the cost of Protect!
  376. EXE/COM; you can protect and distribute as many files as you want with
  377. Protect! EXE/COM once you register. The cost is $25 per copy of Protect!
  378. EXE/COM which may be used on one machine. There is almost no difference
  379. between the registered and unregistered versions of Protect! EXE/COM except
  380. for the "beg screen" and the "Registered to:" message on the main screen. I
  381. was going to have the unregistered version of Protect! EXE/COM imbed a
  382. copyright message or something like "Made With an UNREGISTERED Copy of
  383. Protect! EXE/COM" into the output file, but I decided against it because
  384. most people could get out their favorite hex editor and replace it with
  385. their own message. Because of that, you are even more on your honor to
  386. register Protect! EXE/COM. It is not crippled at all, and I really do not
  387. like finding programs protected with the unregistered version of my program
  388. being distributed. Registered users get support via mail, Compuserve, 
  389. limited BBS support, the ability to distribute protected files, and more!
  390.      There is a definite threat of hackers and viruses on the loose and it
  391. is your responsibility to protect your programs. While some compression
  392. utilities such as LZEXE and PKLite that are already on the market
  393. marginally have the ability to protect your programs, only Protect! EXE/COM
  394. has the solid ability to provide much more protection for only $25.
  395.  
  396.      Thank you for evaluating Protect! EXE/COM and actually reading this
  397. much of the documentation -- Happy EXE/COM Protecting!
  398.  
  399.      Send any Inquiries and Registrations to:
  400.                               Jeremy Lilley
  401.                               27816 Radfall Court
  402.                               Santa Clarita, CA 91350
  403.                               Compuserve: 75060,2074
  404.